﻿using System;
using System.Diagnostics;

namespace SnowFlakeID
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("=======开始生产UID=======");

            Stopwatch sw = new Stopwatch();
            sw.Start();
            SnowFlake snowFlake = new SnowFlake(1, 1);
            for (var i = 0; i < 1000; i++)
            {
                Console.WriteLine(snowFlake.nextId());
            }
            sw.Stop();
            Console.WriteLine("执行耗时：" + sw.ElapsedMilliseconds + "ms");
            Console.ReadKey();
        }
    }
}
